home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / expect-5.16 / FAQ < prev    next >
Encoding:
Text File  |  1995-07-14  |  45.7 KB  |  1,106 lines

  1. This is the Frequent-Asked-Questions (FAQ) file for Expect
  2.  
  3. This file represents questions I've received (with answers I've given)
  4. frequently, usually about subjects that don't fit in the man page for
  5. one reason or another.  In some cases, I've left the original
  6. questions.  I suppose I could've stripped off the headers, but it
  7. seems more realistic to see actual people who've asked the questions.
  8. Thanks to everyone who asked.
  9.  
  10. Rows of hyphens separate the different topics.  In cases where I've
  11. reprinted the original question-letter and my answer, the two are
  12. separated by a short row of hyphens.
  13.  
  14. The papers listed in the README file should also be consulted for highly
  15. technical or philosophical discussion of the implementation, design and
  16. practical application of Expect.
  17.  
  18. -Don
  19.  
  20. Here is a short summary of each question/answer.  You can search for
  21. the number, for example, "#3" once you've found the subject you're
  22. looking for.
  23.  
  24. #0 I keep hearing about Expect.  So what is it?
  25. #1 Why does expect need to be setuid root on Cray?
  26. #2 Why isn't there an expect mailing list?
  27. #3 How do you pronounce "Ousterhout" anyway?  (Or "Libes" for that matter?)
  28. #5 Can expect automatically generate a script from watching a session?
  29. #6 What do you think about the Perl rewrite of Expect?
  30. #7 Why should I learn yet another language (Tcl) instead of writing my
  31.     interaction in <a language I already know>.
  32. #8 How come I get "ioctl(set): Inappropriate ..., bye recursed" ...
  33. #9 Do we need to pay or ask for permission to distribute Expect?
  34. #10 Can Expect understand screen-oriented (curses) programs?
  35. #11 Why doesn't Expect kill telnet (or other programs) sometimes?
  36. #12 Why is this FAQ so short?
  37. #13 Why can't I send the line "user@hostname\r"?
  38. #14 Does Expect run on VMS?
  39. #15 Why does "talk" fail with "Who are you?  You have no entry utmp" or
  40.     "You don't exist.  Go away".
  41. #16 Why don't the examples in your USENIX papers work?
  42. #17 Why does . match a newline?
  43. #18 Is it possible to use Expect and TclX together?
  44. #19 Is it possible to use Expect and <lots of random extensions> together?
  45. #20 Is it possible to prevent Expect from printing out its interactions?
  46. #21 Why isn't overlay covered in Exploring Expect?
  47. #22 Are you going to have a book signing?
  48. #23 Can you put the examples in your book into an anonymous ftp site?
  49. #24 Is the front cover of your book a self portrait (ha ha)?
  50. #25 Are there any hidden dangers in using Expect?
  51. #26 Compile fails with: Don't know how to make pty_.c
  52. --------------------------------------------------------------------------
  53. #0
  54. To: Charles Hymes <chymes@crew.umich.edu>
  55. Subject: I keep hearing about Expect.  So what is it?
  56. In-Reply-To: <199504032103.RAA24736@uri.crew.umich.edu>
  57. References: <9504031905.AA15201@muffin.cme.nist.gov>
  58.     <199504032103.RAA24736@uri.crew.umich.edu>
  59. --text follows this line--
  60. Charles Hymes writes:
  61. >
  62. >
  63. >So,
  64. >What is  Expect?
  65.  
  66. Expect is a tool for automating interactive applications such as
  67. telnet, ftp, passwd, fsck, rlogin, tip, etc.  Expect really makes this
  68. stuff trivial.  Expect is described in many articles, papers, and
  69. FAQs.  There is an entire book on it available from O'Reilly.
  70.  
  71. You can ftp Expect from ftp.cme.nist.gov as pub/expect/expect.tar.Z
  72.  
  73. Don
  74. ----------------------------------------------------------------------
  75. #1
  76. From: libes (Don Libes)
  77. To: u70217@f.nersc.gov (Lori Wong)
  78. Subject: setuid in expect
  79. Date: Thu, 24 Oct 91 16:15:20 EDT
  80.  
  81. >     I have been running expect now under UNICOS 6.1 and CSOS 1.0 (Cray
  82. >Computer Corporation's OS).  The two machines that I am running expect
  83. >on have stringent security features, one of which is to limit setuid
  84. >privileges to specific individuals.  I was wondering if you would be
  85. >kind enough to explain the purpose of the setuid that is needed by expect
  86. >and whether it could be compiled to run without having to have setuid
  87. >privilege?  I know it has to do with spawning and communicating with
  88. >the various spawned tasks, but don't know enough of the details to be
  89. >able to explain why expect specifically needs setuid and whether or not
  90. >it could cause a security problem (could someone use it to enter into
  91. >the system and wreak havoc, for example?).  Right now, I've limited
  92. >the access of expect to my group, but need to know what the security
  93. >implications are if I open it to all users.  I'd appreciate any light
  94. >you can shed on this subject...
  95.  
  96. Root-access is needed to open a pty under Unicos.  Thus, all programs
  97. accessing ptys must be setuid root.  If you do an "ls -l" of programs
  98. like "script", "xterm", etc, you'll see this.
  99.  
  100. I have no idea why this is.  The requirement was probably for security
  101. reasons to begin with, but it has the ironic effect of making more
  102. programs require setuid and therefore greater possibility of errant
  103. setuid programs.
  104.  
  105. In fact, there is one known Unicos bug relating to the way uids are
  106. switched at exec time which requires further special coding.  If you
  107. search for "Cray" in the Expect source you will see significant chunks
  108. of code to get around the problem.
  109.  
  110. I don't know if this reassures you any.  All I can tell you is that a
  111. number of Cray experts have looked into the situation and are happy
  112. with the current implementation of Expect.
  113.  
  114. Don
  115. --------------------------------------------------------------------------
  116. #2
  117. From: libes (Don Libes)
  118. To: dclark@nas.nasa.gov (David R. Clark)
  119. Subject: Mailing list for expect
  120. Date: Mon, 23 Sep 91 18:21:28 EDT
  121.  
  122. >Would be nice if their were an expect mailing list.  I would use it more
  123. >often, and be made aware of other users.  
  124.  
  125. Perhaps I'm too myopic, but I don't see the need for it.  I typically
  126. get two or three expect questions a week, which I answer myself.
  127.  
  128. For one reason or another (usually a bug fix, but often, just revising
  129. the documentation), I update expect about once every two weeks.
  130. Personally, I'd hate being on the other end of something like this.
  131. Who needs patches every two weeks for problems that probably aren't
  132. even relevant to you?
  133.  
  134. >It would be helpful, too, if this served as an area for swapping programs.
  135. >Many of the things that I want to do are done by others already.
  136.  
  137. Send me things that you'd like to distribute.  I'll either include
  138. them with expect or put it in a publicly accessible directory so other
  139. people can get it.  Yes, I know it's not as good as getting notified
  140. via a mailing list, but actually I doubt there's such a need.  The
  141. reality is that most of the programs expect is applied to have
  142. poorly defined interfaces.  There are few portable expect scripts.
  143.  
  144. For example, you can't even write a guaranteed-portable script that
  145. knows what a shell prompt looks like because everyone customizes them!
  146. And the ftp scripts don't work on everyone's ftp because the ftp user
  147. interface is not specified by the standard, so everyone's is
  148. different.  And so on.
  149.  
  150. There is a Tcl newsgroup, comp.lang.tcl, which many expect users read.
  151. It's pretty good for asking questions about Tcl, and there isn't that
  152. much traffic that an occasional Expect question isn't looked upon
  153. favorably.  Indeed, some of the sharpest Tcl hackers read the mailing
  154. list, so I post news about new-releases of expect there first.  The
  155. newsgroup is gatewayed to a mailing list (tcl@sprite.berkeley.edu)
  156. which is further described in the Tcl documentation.
  157.  
  158. Don
  159. --------------------------------------------------------------------------
  160. #3
  161. From: ouster@sprite.Berkeley.EDU (John Ousterhout)
  162. To: libes@cme.nist.gov
  163. Subject: Re: pronunciation?
  164. Date: Tue, 29 May 90 21:26:10 PDT
  165.  
  166. Those of us in the family pronounce it "OH-stir-howt", where the
  167. first syllable rhymes with "low", the second with "purr", and the
  168. third with "doubt".  Unfortunately this isn't the correct Dutch
  169. pronounciation for a name spelled this way (someplace along
  170. the line it got misspelled:  it was originally "Oosterhout"), nor
  171. is it what you'd guess if you use common sense.  So, we've gotten
  172. used to responding to almost anything.
  173.  
  174.                     -John-
  175.  
  176. I suppose I should say something in kind.  "Libes" is pronounced
  177. "Lee-bus" with stress on the first syllable.  Like John, though, I've
  178. gotten used to responding to anything close. - Don
  179. --------------------------------------------------------------------------
  180. #5
  181. From: libes (Don Libes)
  182. To: pete@willow24.cray.com
  183. Subject: expect
  184. Date: Fri, 12 Oct 90 17:16:47 EDT
  185.  
  186. >I like "expect" and am thinking of using it to help automate the
  187. >testing of interactive programs.  It would be useful if expect had a
  188. >"watch me" mode, where it "looks over the shoulder" of the user and
  189. >records his keystrokes for later use in an expect script.
  190. >
  191. >(Red Ryder and other Macintosh telecommunications packages offer this
  192. >sort of thing.  You log onto Compuserve once in "watch me" mode, and
  193. >RR keeps track of the keystrokes/prompts.  When you're done you have a
  194. >script that can be used to log onto Compuserve automatically.)   
  195.  
  196. I'd like to see how they do it.  The major problem is when you type
  197. characters, they are invariably echoed.  So if you "interact" with a
  198. system and type "finger", what expect sees is that
  199. you typed 'f',
  200. computer typed 'f',
  201. you typed 'i',
  202. computer typed 'i',
  203. you typed 'n',
  204. computer typed 'n',
  205. ...
  206.  
  207. I.e. expect has no way of knowing that you weren't waiting to see the
  208. computer say 'f', before you typed 'f'.
  209.  
  210. You'd have to handle problems like this, kind of guessing if the
  211. computer is echoing or you are really waiting for the response.  The
  212. system actually doesn't echo exactly what you type, making this even
  213. harder.  And there are other problems: sometimes characters get lumped
  214. together rather than sent separately, sometimes echoing is turned off
  215. for you.
  216.  
  217. If you run expect in debug mode while doing "interact", you'll see
  218. what I mean.
  219.  
  220. Given that you'd have to do such severe editing of an automatically
  221. produced script, I figure writing the script from scratch is easier.
  222.  
  223. Actually, I suggest you used the interact facility (or the UNIX script
  224. program) and just edit the output.  Invariably, you want to change a
  225. lot of text to *s and add alternatives (i.e. a lot of editing) anyway.
  226.  
  227. Do you have to do much editing with scripts that Red Ryder produces?
  228. How does it handle these problems?  Does it support regular
  229. expressions and alternation?  (Obviously, a computer-generated script
  230. can't generate these automatically.)  Do you have to tell it whether
  231. you are full/half-duplex or what kind of line-termination characters
  232. you are using?
  233.  
  234. Is there anything else in Red Ryder that would be useful in expect?
  235.  
  236. >Before I look into adding a "watch me" feature, I thought I should
  237. >ask: has this been done already?
  238.  
  239. You're welcome to give it a shot.  I'd be interested to see what you
  240. come up with.
  241.  
  242. Don
  243.  
  244. ------------------
  245.  
  246. From: (Pete TerMaat) <pete@willow.cray.com>
  247. To: libes@cme.nist.gov (Don Libes)
  248. Subject: Re: expect 
  249. Date: Thu, 17 Jan 91 12:30:01 -0600
  250.  
  251.  > >I like "expect" and am thinking of using it to help automate the
  252.  > >testing of interactive programs.  It would be useful if expect had a
  253.  > >"watch me" mode, where it "looks over the shoulder" of the user and
  254.  > >records his keystrokes for later use in an expect script.
  255.  > >
  256.  > >(Red Ryder and other Macintosh telecommunications packages offer this
  257.  > >sort of thing.  You log onto Compuserve once in "watch me" mode, and
  258.  > >RR keeps track of the keystrokes/prompts.  When you're done you have a
  259.  > >script that can be used to log onto Compuserve automatically.)   
  260.  > 
  261.  > I'd like to see how they do it.  The major problem is when you type
  262.  > characters, they are invariably echoed.
  263.  
  264.  > You'd have to handle problems like this, kind of guessing if the
  265.  > computer is echoing or you are really waiting for the response.
  266.  
  267. That appears to be what Red Ryder does.  It works surprisingly well
  268. for line-oriented things.  It produces unnecessarily lengthy (though
  269. still working) scripts when you make a lot of corrections by
  270. backspacing.  And it isn't suitable for character-oriented things like
  271. editors, where there is no notion of a prompt.
  272.  
  273.  > If you run expect in debug mode while doing "interact", you'll see
  274.  > what I mean.
  275.  
  276. Ah, thanks for the tip.  I hadn't appreciated the problem.
  277.  
  278.  > Actually, I suggest you used the interact facility (or the UNIX script
  279.  > program) and just edit the output.  Invariably, you want to change a
  280.  > lot of text to *s and add alternatives (i.e. a lot of editing) anyway.
  281.  
  282. I'm working with text editors and document viewers, so for every
  283. character typed there can be a lot of output.  It wouldn't make sense
  284. for me to wade through all that output and trim it down.
  285.  
  286. Writing the scripts from scratch, as you suggested, is currently my
  287. best approach.  I'm also experimenting with a command which logs just
  288. the input.
  289.  
  290.  > Do you have to do much editing with scripts that Red Ryder produces?
  291.  
  292. Here's an example from Microphone (another Macintosh communications
  293. program), which is not as sophisticated in its watchme mode as Red
  294. Ryder.  I had it watch me while I typed "echo this is a test" to the
  295. shell.  It's pretty stupid, but (to my surprise) the script
  296. nevertheless works, without any editing.
  297.  
  298.     6   Wait for Text  "% "
  299.     7   Send Text String  "echo"
  300.     8   Wait for Text  "% ech"
  301.     9   Send Text String  " "
  302.     10  Wait for Text  "echo "
  303.     11  Send Text String  "this"
  304.     12  Wait for Text  "o thi"
  305.     13  Send Text String  " "
  306.     14  Wait for Text  "this "
  307.     15  Send Text String  "is a "
  308.     16  Wait for Text  "is a "
  309.     17  Send Text String  "te"
  310.     18  Wait for Text  " a te"
  311.     19  Send Text String  "st"
  312.     20  Wait for Text  " test"
  313.     21  Send Text String  "^M"
  314.     22  Wait for Line Containing  " test"
  315.  
  316. Here's an example of the same thing done with Red Ryder watching.
  317. Much better!
  318.  
  319.     PROMPT % 
  320.     PAUSE
  321.     TYPE echo this is a test^M
  322.     PROMPT % 
  323.  
  324. Red Ryder appears to keep track of what was typed and eliminate that
  325. from any possible prompts.  As you pointed out, what was typed is not
  326. always what was printed, but in my experience (mostly using it to dial
  327. up to UNIX sites) this hasn't been a problem.
  328.  
  329.  > How does it handle these problems?  Does it support regular
  330.  > expressions and alternation?  (Obviously, a computer-generated script
  331.  > can't generate these automatically.)  
  332.  
  333. No, just literals.  Red Ryder won't go back further than the last line
  334. of output, which usually works better than Microphone's more generous
  335. approach. 
  336.  
  337.  > Do you have to tell it whether you are full/half-duplex or what
  338.  > kind of line-termination characters you are using?
  339.  
  340. Since it's a communications program it already has the info, but I
  341. don't know that it uses this information when it creates the scripts.
  342.  
  343.  > Is there anything else in Red Ryder that would be useful in expect?
  344.  
  345. Good question.  I think expect has these programs beat though, with
  346. the exception of a watchme feature.  A visual interface would be nice,
  347. as one thing that I miss from Red Ryder is the status line, which
  348. tells you the current command.  (I know you can sort of simulate this
  349. by tracing the TCL code.)  Some of my expect scripts are long and it's
  350. helpful to know what they are sending/expecting when they pause/hang.
  351. As long as I'm dreaming, it would also be nice if I could single-step
  352. through a script by pressing a "single-step" button.  I guess these
  353. are more TCL issues than expect issues.
  354.  
  355. Microphone has a nice interface for novices.  You can write a script
  356. with very little typing by pointing and clicking from menus of
  357. keywords.  Red Ryder's language is less verbose and probably more
  358. powerful, but neither is as powerful/flexible as expect/TCL.
  359.  
  360.  > >Before I look into adding a "watch me" feature, I thought I should
  361.  > >ask: has this been done already?
  362.  > 
  363.  > You're welcome to give it a shot.  I'd be interested to see what you
  364.  > come up with.
  365.  
  366. Since it's not quite so useful for character-oriented editors as for
  367. line-oriented things, I've decided for now just to write the scripts
  368. from scratch.
  369.  
  370. I'll say again that I like the tool a lot--nice work!  There are other
  371. people here using it for things like the testing of ksh, which
  372. responds differently to signals when not used interactively.
  373.  
  374. I have some mods to make expect run on a Cray.  I was sort of waiting
  375. to see if the mods are Cray-specific or System V specific before
  376. forwarding them, but if you would like to incorporate them right away
  377. I will send them.
  378.  
  379. -- Pete
  380.  
  381. --------------------------------------------------------------------------
  382. #6
  383. From: libes@cme.nist.gov (Don Libes)
  384. Subject: Re: Expect.pl, alpha release
  385. Date: 2 Nov 90 03:06:40 GMT
  386.  
  387. In article <1990Nov2.003228.22744@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes:
  388. >The motivation for writing this package is the fact
  389. >that Don Libes doesn't like Perl. :-)
  390.  
  391. I've never said anything like that, nor is it true (although I will admit
  392. that I've had a lot of trouble learning Perl.)  Fact is, I've written
  393. several Perl hacks, at least one of which is used daily at my site.
  394.  
  395. >The matchup of expect<->tcl and expect.pl<->Perl made for some weird
  396. >design tradeoffs.  I may start from mostly scratch and do everything
  397. >right.  That is probably why I hesitate to implement the rest of the
  398. >functions... they really don't fit in a Perl environment.
  399.  
  400. Actually, I discussed these issues with several people during the
  401. development of expect.  The approach I took effectively sealed off the
  402. user from the underlying C implementation, substituting the more shell-
  403. like Tcl language and reducing the ability to screw themselves somehow.
  404.  
  405. In the approach you took, the user language IS Perl, which provides
  406. incredible power and flexibility.  The primary disadvantage is that
  407. the user may have to learn Perl, which is hard.
  408.  
  409. Also, as you noticed, some of the features (like logging) are a problem
  410. for Perl.  Oh, and as you suspected, recursive invocations are useful -
  411. consider writing scripts that are half automated and half interactive,
  412. like the fsck script I showed at the LISA conference.
  413.  
  414. Please don't get me wrong.  I think Perl is very useful.  I desperately
  415. want a copy of your book.  And I consider it a compliment that you
  416. followed my implementation as faithfully as you did.  Though, I did
  417. think some of your Perl code pretty weird!
  418.  
  419. Actually, in my USENIX paper I stated that I fully expected someone to
  420. incorporate the expect primitives into a shell, Perl, whatever.  I was
  421. just showing proof of concept.  It just happened to turn out to be
  422. worth keeping around.
  423.  
  424. In fact, I owe a lot for it to John Ousterhout who wrote Tcl.
  425.  
  426. Don Libes          libes@cme.nist.gov      ...!uunet!cme-durer!libes
  427. ------------------
  428. Article 10362 in comp.lang.perl:
  429. From: merlyn@ora.com (Randal L. Schwartz)
  430. Subject: Re: perl4.035 & Solaris2.1 & sockets problem
  431. Message-ID: <MERLYN.93Feb18080120@romulus.reed.edu>
  432. Date: 18 Feb 93 16:01:26 GMT
  433. References: <110637@bu.edu> <1993Feb17.221430.19168@jpl-devvax.jpl.nasa.gov>
  434. Organization: Stonehenge Consulting Services; Portland, Oregon, USA
  435. Lines: 26
  436. In-Reply-To: dnoble@hobbs's message of 17 Feb 93 22:14:30 GMT
  437.  
  438. >>>>> In article <1993Feb17.221430.19168@jpl-devvax.jpl.nasa.gov>, dnoble@hobbs (David Noble) writes:
  439. David> Check to see if 'sys/socket.ph' is required by the script. If it's not
  440. David> there, the script may have hard-coded some constants that are different
  441. David> under Solaris. Reminds me of some code in chat2.pl:
  442. David>         unless (socket(S, 2, 1, 6)) {
  443. David>                 # XXX hardwired $AF_SOCKET, $SOCK_STREAM, 'tcp'
  444. David>                 # but who the heck would change these anyway? (:-)
  445.  
  446. Yup.  I've been bitten by this code (*my* code) myself when I moved to
  447. a blecchy sysV environment.
  448.  
  449. All because I had used chat2 on only the few boxes (all BSD-derived)
  450. that I had access to at the time, and I was too lazy to run h2ph. :-)
  451.  
  452. *Someday* soon, after the 5.0 camel update, and Learning Perl hits the
  453. stands, I'm going to rewrite the chat2 stuff to make it portable, add
  454. some documentation, and then release it (finally!) as a Beta release.
  455. (It's still just an alpha, folks!  Enough stuff to make it work for
  456. *my* needs, but not really meant as a general tool yet!... sigh.)
  457.  
  458. print "Just another Perl [book and class, but not lib code :-] hacker,"
  459. --
  460. Randal L. Schwartz
  461. --------------------------------------------------------------------------
  462. #7
  463. From: libes (Don Libes)
  464. To: Aamod Sane <sane@cs.uiuc.edu>
  465. Cc: libes
  466. Subject: Re: Expect, Tcl, programmed dialogue etc.
  467. Date: Mon, 2 Sep 91 15:47:14 EDT
  468.  
  469. >    >>A friend told me about "expect". But then, I have to know the
  470. >    >>idiocies of "tcl". I would like to know if there is an alternative
  471. >    >>to expect that is also useful in other places, so that I do not
  472. >    >>have to spend time getting used to tcl for just this one tool.
  473. >
  474. >    Your reasoning is shortsighted.  Tcl is a language that can be used in
  475. >    other applications.  It won't be a waste of your time to learn it.
  476. >
  477. >I have nothing against tcl as such.
  478. >The reluctance to learn it comes mainly from the feeling that half my
  479. >life seems to be spent learning new languages that differ very little
  480. >from existing ones, and differ in annoying little details at that.
  481. >To add to the misery, every implementation has its own
  482. >idiosyncracies...:-(
  483.  
  484. Ironically, Tcl was written specifically to halt this very problem.
  485.  
  486. The author recognized that every utility seems to have its own
  487. idiosyncratic .rc file or programming language.  Tcl was designed as a
  488. general-purpose language that could be included with any utility, to
  489. avoid having everyone hack up their own new language.
  490.  
  491. In this context, your statements to the newsgroup do Tcl a great
  492. disservice.
  493.  
  494. Don
  495. ------------------------------------------------------------------------
  496. #8
  497. From: james@Solbourne.COM (James B. Davis)
  498. To: libes@cme.nist.gov
  499. Subject: How come I get "ioctl(set): Inappropriate ..., bye recursed" ...
  500. Date: Tue, 10 Dec 91 10:47:21 MST
  501.  
  502. Every time I ^C out of a expect script run I get:
  503.  
  504. ioctl(set): Inappropriate ioctl for device
  505. bye recursed
  506.  
  507. Is this standard or am I doing something wrong?
  508.  
  509. james@solbourne.com
  510. ---------------
  511. From: Michael Grant <mgrant@xdr.ncsl.nist.gov>
  512. Subject: Re: How come I get "ioctl(set): Inappropriate ..., bye recursed" ...
  513. Date: Tue, 10 Dec 91 16:05:01 EST
  514.  
  515. The problem was that I hadn't run the fixincludes shellscript and
  516. recompiled gcc with itself during gcc installation.  I recompiled gcc
  517. with itself, then ran the fixincludes script, the messages went away.
  518.  
  519. Michael Grant
  520.  
  521. --------------------------------------------------------------------------
  522. #9
  523. From: libes (Don Libes)
  524. To: Mohammad Reza Jahanbin <mrj@CIS.Prime.COM>
  525. Subject: Copyright Question.
  526. Date: Tue, 26 Jan 93 23:46:24 EST
  527.  
  528. Mohammad Reza Jahanbin writes:
  529. >Before anything let me thank you on behalf of ComputeVision R&D for
  530. >putting so much effort into expect. Part of CV has been using expect
  531. >for the past two years or so to build variety of tools including an
  532. >automated testbed for a product.
  533. >
  534. >CV is currently considering shipping the automated testbed to some of its
  535. >retailers, to enable them to perform their own tests before distributing
  536. >the product.
  537. >
  538. >The Question is, are we allowed to ship expect? Do we need to ask
  539. >anyone for permission? Do we need to say or write anything in the
  540. >documentation? Do we need to pay for it?
  541. >
  542. >I have not been able to find any copyright (or indeed copyleft) notices
  543. >in the usual expect distribution. Would you be able to clarify our position.
  544.  
  545. Sorry to delay in responding.  I sent your request to my management
  546. and they had to discuss it (if they didn't, there would be no reason
  547. to pay them).  While they continue to discuss it, I can tell you
  548. informally the gist of what they will eventually say:
  549.  
  550. You are allowed to do just about anything with Expect.  You can even
  551. sell it.  You need not ask our permission.  You need not pay for it.
  552. (It is my understanding that your tax dollars, in effect, already have
  553. paid for it.)
  554.  
  555. You cannot claim that you wrote it (since this would be a lie), nor
  556. can you attempt to copyright it (this would be fruitless as it is a
  557. work of the US government and therefore not subject to copyright).
  558.  
  559. NIST would appreciate any credit you can give for this work.  One line
  560. may suffice (as far as I'm concerned) although there should be
  561. something to the effect that this software was produced for research
  562. purposes.  No warantee, guarantee, liability is implied.
  563.  
  564. My management would appreciate it if you sent a letter on your company
  565. letterhead suitably praising Expect and briefly describing how it has
  566. helped your business.  Send this to the following individuals:
  567.  
  568. Arati Prabhakar, Director
  569. NIST
  570. Admin Bldg, Rm A-1134
  571. Gaithersburg, MD 20899
  572.  
  573. Mike Wozny, Manufacturing Engineering Laboratory
  574. NIST
  575. Bldg 220, Rm B-322
  576. Gaithersburg, MD 20899
  577.  
  578. Howard Bloom, Manufacturing Systems Integration Division
  579. NIST
  580. Bldg 220, Rm A-127
  581. Gaithersburg, MD 20899
  582.  
  583. Steve Ray, Information Dissemination Group
  584. NIST
  585. Bldg 220, Rm A-127
  586. Gaithersburg, MD 20899
  587.  
  588. In case you're wondering about the uninformative titles, Arati is the
  589. directory of all of NIST (about 3000 people) and Steve (way down there
  590. at the bottom) is my immediate supervisor (and of 7 other people).
  591.  
  592. If you feel more indebted than a letter can express, your company can
  593. sign a CRADA (Cooperative Research and Development Agreement) with
  594. NIST.  This is a contract that can be customized as you like.
  595. Typically, CRADA's state that we give you explicit permission to
  596. distribute or commercialize our code, and that we are willing not to
  597. divulge any company secrets you tell us.  CRADA's can also state
  598. that we will share further developments with you, or that you are
  599. giving us money or software, or even just sending us bugs, fixes and
  600. experiences.
  601.  
  602. These contracts are looked upon by Congress as an indication that we
  603. are helping American industry (i.e., doing our job).  Even though they
  604. seem vague and almost pointless, they essentially are brownie points
  605. for NIST when it comes to asking for funding from Congress each year.
  606.  
  607. I hope this has answered your questions.  Let me know if you have
  608. further questions.
  609.  
  610. Don
  611. ----------------------------------------------------------------------
  612. #10 Can Expect understand screen-oriented (curses) programs?
  613.  
  614. I wrote a script called "term_expect" which uses a Tk text widget to
  615. support screen-oriented expect commands.  This is described further in
  616. Chapter 19 of Exploring Expect.  The code is in Expect's example
  617. directory.
  618.  
  619. Adrian Mariano <adrian@cam.cornell.edu> converted the term_expect code
  620. (see above) so that it runs without Tk (exercise 4 in Chapter 19!)
  621. This is available in the example directory as "virterm".
  622.  
  623. Mark Weissman (weissman@gte.com) and Christopher Matheus modified a
  624. version of Expect so that it has a built-in Curses emulator.  It can
  625. be ftp'd from the Tcl archive as expecTerm1.0beta.tar.Z.  Note that
  626. Expecterm does not run with the current version of Expect.  On the
  627. other hand, if you are interested in doing some development and
  628. porting work, let me know.  While I'm still gathering ideas, I suspect
  629. that ultimately I would like to take the ideas of term_expect and the
  630. implementation approach of Expecterm.
  631.  
  632. ----------------------------------------------------------------------
  633. #11 Why doesn't Expect kill telnet (or other programs) sometimes?
  634.  
  635. To: Karl.Sierka@Labyrinth.COM
  636. Subject: Re: need help running telnet expect script from cron on sunos 4.1.3
  637. --text follows this line--
  638. karl.sierka@labyrinth.com writes:
  639. >       The only problem I am still having with the script I wrote is that
  640. >    the telnet does not seem to die on it's own, unless I turn on debugging.
  641.  
  642. Actually, Expect doesn't explicitly kill processes at all.  Generally,
  643. processes kill themselves after reading EOF on input.  So it just seems
  644. like Expect kills all of its children.
  645.  
  646. >    I was forced to save the pid of the spawned telnet, and kill it with an
  647. >    'exec kill $pid' in a proc that is hopefully called before the script
  648. >    exits. This seems to work fine, but it makes me nervous since omnet
  649. >    charges for connect time, and leaving a hung telnet lying around could
  650. >    get expensive. I warned the rest of the staff so that they will also be
  651. >    on the lookout for any possible hung telnets to omnet.
  652.  
  653. The problem is that telnet is not recognizing EOF.  (This is quite
  654. understandable since real users can't actually generate one from the
  655. telnet user interface.)  The solution is to either 1) explicitly drive
  656. telnet to kill itself (i.e., a graceful logout) followed by "expect
  657. eof" or 2) "exec kill" as you are doing.
  658.  
  659. Don
  660. ----------------------------------------------------------------------
  661. #12
  662. To: Wade Holst <wade@cs.ualberta.ca>
  663. In-reply-to: <94Mar31.175223-0700.18671-2@scapa.cs.ualberta.ca>
  664. Subject: Expect question
  665. --text follows this line--
  666. Wade Holst writes:
  667. >
  668. >For version 5.5, running on sparc with SunOS 4.1.3
  669. >
  670. > 1) Is there a more up-to-date version of the FAQ than what
  671. >    comes with expect-5.5?  (For such a useful application, I
  672. >    would expect more than 12 questions).
  673.  
  674. Funny you should ask that because it's been on my mind lately and no
  675. one else has asked.  I know a lot of other packages have huge FAQs but
  676. I have always believed that this is an indication that their man pages
  677. suck.  By comparison, the stuff in the Expect FAQ is only the stuff
  678. that just doesn't belong in the man page.
  679.  
  680. On the other hand, I've recently seen some really well-written FAQs -
  681. they duplicate some material but they are organized so well that
  682. they're a pleasure to use.  So I guess I'm changing my mind on FAQs.
  683. I just haven't had the time to make one.
  684.  
  685. I've actually been working on a real book on Expect.  It answers
  686. all of the questions I get  - unfortunately it is 400+ pages.  So it's
  687. not very appropriate for an FAQ either!  It should be out in the
  688. second half of '94.
  689. ----------------------------------------------------------------------
  690. #13
  691. To: bt@nadine.hpl.hp.com
  692. Subject: Re: [Q] expect, ftp and '@'
  693. --text follows this line--
  694. >   I am attempting to use expect to perform anonymous ftp gets without
  695. >my having to type all the stuff --- I mean, waaaiiiting for the
  696. >prompt, entering a-n-o-n-y-m-o-u-s with my fat fingers, and the rest.
  697. >
  698. >   But I have a probleme: as I set the password to be my e-mail address:
  699. >   set password "bt@hplb.hpl.hp.com"
  700.  
  701. > the ftp servers seem not to receive neither my login name nor the
  702. >at-sign. Some of them do not care, some others say "ok, but don't do
  703. >that again", and the last ones throw me off.
  704.  
  705. spawn initializes the terminal using your current parameters and then
  706. forces them to be "sane".  Unfortunately, on your system "sane" says
  707. to interprete the "@" as the line-kill character.
  708.  
  709. The most sensible thing to do is change "sane" in your Makefile to
  710. something that makes sense.  (Since you work at HP, you might also
  711. suggest that they modernize stty!)
  712.  
  713. Other alternatives are: quote the @, or use the -nottyinit flag, or
  714. set the stty_init variable.
  715.  
  716. Don
  717.  
  718. --------------------------------------------------------------------------
  719. #14
  720. To: Cameron Laird <claird@Starbase.NeoSoft.COM>
  721. Subject: VMS question.
  722. In-Reply-To: <199406022231.RAA18090@Starbase.NeoSoft.COM>
  723. References: <199406022231.RAA18090@Starbase.NeoSoft.COM>
  724. --text follows this line--
  725. Cameron Laird writes:
  726. >Do you know of anyone working with expect and VMS?
  727. >I'd like not to re-invent wheels, but, if I'm to be
  728. >the first one, I want others to benefit.
  729.  
  730. No, I'm not aware of anyone doing it.  Since VMS claims POSIX
  731. conformance, it shouldn't be that hard - Expect uses the POSIX calls
  732. if it can.  Probably the hardest part will just be modifying the Makefile
  733. and the configure script!
  734.  
  735. Note however, that there might be a simpler solution.  The neat thing
  736. about Expect is that you can control other computers easily.  Run
  737. Expect on your UNIX box and have it log in to the VMS box and do its
  738. thing.  (You can bypass the login garbage by using an inet daemon.)
  739. We've done exactly this to a number of weird pieces of hardware we
  740. have around the lab (robots, Lisp machines, embedded controllers, and,
  741. of course, a VAX running VMS).  It saves time porting!
  742.  
  743. Don
  744. ----------------------------------------------------------------------
  745. #15
  746. To: Will Smith (AC) <william@ritchie.acomp.usf.edu>
  747. In-reply-to: <199406061603.MAA23906@ritchie.acomp.usf.edu>
  748. Subject: expect
  749. --text follows this line--
  750. Will Smith (AC) writes:
  751. >Hi there.  I was wondering if you had any ideas to why i am getting
  752. >this problem running an expect script which tries to spawn a talk
  753. >process to myself on another machine. Would it have anything to do
  754. >with the fact that the executables are NOT installed in /usr/local/bin
  755. >or because it wasnt installed by ROOT or what. This is what my expect
  756. >script looks like.
  757. >
  758. >#! /home/ritchie/ops/william/test/expect -f
  759. >
  760. >spawn talk william@curiac.acomp
  761. >set timeout 200
  762. >expect {*established*}
  763. >set send_human {.1 .3 1 .05 2}
  764. >send -h "This is only a test.. I swear \ Please don't bust me with expect \n \
  765. >expect "{*\r*}"
  766. >expect "{*\r*}"
  767. >exec sleep 5
  768. >send -h "Ok, well see ya tomorrow you idiot \n"
  769. >exec sleep 3
  770. >
  771. >The error i get is that it returns this when i run the script.
  772. >
  773. >  Who are you? You have no entry in /etc/utmp! Aborting...
  774.  
  775. On most systems, Expect does not automatically make a utmp entry.  (A
  776. utmp entry normally indicates login information which seems kind of
  777. pointless for Expect scripts.)  This allows Expect to run non-setuid.
  778.  
  779. Normally, this lack of utmp entries doesn't mean much.  However, a few
  780. programs actually refuse to run without a utmp entry.  Fortunately,
  781. there are workarounds:
  782.  
  783. Program-dependent solutions:
  784.  
  785. "talk" is the only program I'm aware of that falls into this category.
  786. One solution is to get ytalk.  ytalk doesn't have this problem plus it
  787. fixes many other bugs in talk, such as being able to communicate with
  788. both old and new talk.
  789.  
  790. Program-independent solutions:
  791.  
  792. Use a program specifically intended to create utmp entries.  Such
  793. programs are easy to write or get if you don't have them already.  For
  794. instance, sessreg is one which comes with the xdm distribution.  I
  795. like this approach because it isolates the setuid code in a small
  796. single system utility rather than in every program on the system that
  797. needs this ability.
  798.  
  799. Don
  800. --------------------------------------------------------------------------
  801. #16
  802. To: Will Smith (AC) <william@ritchie.acomp.usf.edu>
  803. Subject: expect
  804. --text follows this line--
  805. Will Smith (AC) writes:
  806. >I just entered some scripts from a USENIX paper that my boss had.  I get
  807. >errors about my quotes in the script.  Also, it doesn't seem to know
  808. >about expect_match.  Thanks in advance for any insight you could offer.
  809.  
  810. The USENIX papers are old and out-of-date as far as quoting goes.  A
  811. couple years ago, I cleaned up and simplified this aspect of Expect.
  812. Similarly, expect_out is now where the results of expect's pattern
  813. matching are saved.
  814.  
  815. The man page is always the best reference on what Expect currently
  816. supports.  Alternatively, you can read the CHANGES files.  These files
  817. document the changes from one major version to another.
  818.  
  819. Don
  820. --------------------------------------------------------------------------
  821. #17 Why does . match a newline?
  822. To: xipr@alv.teli.se (Ivan Prochazka)
  823. Subject: Why does . match a newline?
  824. Ivan Prochazka writes:
  825. >
  826. >Hello Don.
  827. >
  828. >In my opinion(and emacs) the regexp-symbol "." stands for all
  829. >characters except newline(\n). 
  830. >This is not the case in expect 5.2.
  831.  
  832. Yes, there are some packages that follow this convention, but I don't
  833. think it is appropriate for Expect.  Unlike emacs, most Expect
  834. patterns don't look for full lines - more often they look for prompts
  835. which *don't* end with newlines.  I find that I actually write the
  836. \[^\n] pattern very rarely.  And if I write it frequently in a script,
  837. then the expect itself probably ought to be in a subroutine.
  838.  
  839. In fact, the more common line terminating sequence in Expect is \r\n,
  840. so that might make a more likely argument.  In any case, Expect
  841. defines . the way POSIX does.  So I feel pretty good about the
  842. definition of . being what it is.
  843.  
  844. Don
  845. --------------------------------------------------------------------------
  846. #18 Is it possible to use Expect and TclX together?
  847. From: bfriesen@iphase.com (Bob Friesenhahn)
  848. Date: 20 Jul 1994 04:09:43 GMT
  849. Organization: Interphase Corporation, Dallas TX - USA
  850.  
  851. Jeffery A. Echtenkamp (echtenka@michigan.nb.rockwell.com) wrote:
  852. : Do expect and tclX work together? If so, must anything special be done to 
  853. : get them to work together?
  854.  
  855. They work fine together.  However, you should pre-pend "exp_" to your expect
  856. command names.  This will ensure that there are no conflicts between expect
  857. commands and tclX commands of the same name (like wait).
  858.  
  859. Just pick up the "make-a-wish" package, follow the instructions, and you will
  860. be all set.  I have built a wish based on tcl, tk, expect, tclX, and dp using
  861. this technique with no observed problems.
  862.  
  863. Bob
  864. --- 
  865. Bob Friesenhahn, Interphase
  866. bfriesen@iphase.com
  867. --------------------------------------------------------------------------
  868. #19 Is it possible to use Expect and <lots of random extensions> together?
  869. To: Frank Winkler <winkler@eas.iis.fhg.de>
  870. Subject: Q expect + TkSteal
  871. In-Reply-To: <9410190941.AA11791@seth.eas.iis.fhg.de>
  872. References: <9410190941.AA11791@seth.eas.iis.fhg.de>
  873. --text follows this line--
  874. Frank Winkler writes:
  875. >Hi don,
  876. >
  877. >a short question considering installation of expectk.
  878. >
  879. >Is it possible to build an expectk-binary, which uses 
  880. >the features of BLT, TkSteal and expect ?
  881.  
  882. I've never done it, but I know it must be possible because the tgdb
  883. package in the Tcl archive uses all of those extensions with Expect.
  884.  
  885. Expect is a "well-behaved extension" in the sense that it requires no
  886. changes to the Tcl core.  So Expect should work with any other Tcl
  887. extensions.  You just need to add the usual Exp_Init call to main() or
  888. the other _Init calls to Expect's main.
  889.  
  890. >If yes, which of them should be build first, second ... ?
  891.  
  892. Order doesn't matter.
  893.  
  894. I've done this kind of thing by hand.  It's pretty simple.  But people
  895. tell me the make-a-wish package in the Tcl archive automates the
  896. creation of multi-extension Tcl applications.
  897.  
  898. Don
  899. ----------------------------------------------------------------------
  900. #20 Is it possible to prevent Expect from printing out its interactions?
  901. To: Sunanda Iyengar <sunanda@simvax.labmed.umn.edu>
  902. Subject: Disabling display from expect
  903. In-Reply-To: <199410131529.KAA07113@minotaur.labmed.umn.edu>
  904. References: <9410121544.AA07437@muffin.cme.nist.gov>
  905.     <199410131529.KAA07113@minotaur.labmed.umn.edu>
  906. --text follows this line--
  907. Sunanda Iyengar writes:
  908. >Is it possible to have expect interact with a process and not print-out
  909. >the results of interaction? In my application, I need it to go into a 
  910. >silent mode, communicate with a process without reporting to the user, and
  911. >then come back to normal mode and  put the process into interactive mode.
  912.  
  913. Use the following command:
  914.  
  915.     log_user 0
  916.  
  917. To restore output:
  918.  
  919.     log_user 1
  920.  
  921. See the Expect man page for more details or page 175 of Exploring
  922. Expect for details and examples.
  923.  
  924. Don
  925. ----------------------------------------------------------------------
  926. #21 Why isn't overlay covered in Exploring Expect?
  927.  
  928. To: spaf@cs.purdue.edu
  929. Subject: Your book
  930. In-Reply-To: <199501061610.LAA26057@uther.cs.purdue.edu>
  931. References: <199501061610.LAA26057@uther.cs.purdue.edu>
  932. --text follows this line--
  933. Gene Spafford writes:
  934. >I'm curious as to why the "overlay" command is not mentioned anywhere
  935. >in the book.  Is that a recent addition?  A deprecated feature?  I
  936. >ended up using it in one of my scripts....
  937.  
  938. The overlay command has been in Expect for a long time.  In all that
  939. time no one has ever asked me about it and I have never used it.
  940. Well, I used it once but I really didn't like the result, and so I
  941. rewrote the script to not use it.  I left the overlay command in
  942. Expect because it seemed like an interesting idea, but I never really
  943. finished it - in the sense that I believe it needs some more options
  944. and controls.  In comparison, the interact command is very flexible
  945. and makes the need for overlay pretty moot.
  946.  
  947. --------------------------------------------------------------------------
  948. #22 Are you going to have a book signing?
  949.  
  950. To: Josef Sachs <sachs@panix.com>
  951. Subject: expect
  952. --text follows this line--
  953. Josef Sachs writes:
  954. >Do you have any book-signing sessions planned?
  955.  
  956. That's very ego-boosting to contemplate but I doubt that my name/book
  957. is enough to draw the kind of crowd that would make it worthwhile.
  958. I'll leave that kind of thing to Howard Stern.  Anyway, I have a
  959. full-time job working for the government.  I doubt they would take too
  960. kindly to me taking time off for self-aggrandizing.  (They weren't
  961. particularly encouraging to have me write a book in the first place -
  962. as you'll read in the Preface.)
  963.  
  964. I've written a couple of other books and people have mailed me those
  965. for signatures.  (One guy sent me an entire box of books for
  966. signatures - he was giving them to friends as Christmas gifts.)  If
  967. you're similarly inclined, my address is in Expect's README file.  Or
  968. if you're ever in my neck of the woods, feel free to stop by for a
  969. chat (and bring your copy).
  970.  
  971. Don
  972.  
  973. ----------------------------------------------------------------------
  974. #23 Can you put the examples in your book into an anonymous ftp site?
  975.  
  976. To: pren@cs.umass.edu
  977. Subject: Examples in your book "exploring Expect"
  978. In-Reply-To: <199501101644.LAA06260@genesis.cs.umass.edu>
  979. References: <199501101644.LAA06260@genesis.cs.umass.edu>
  980. --text follows this line--
  981. Peifong Ren writes:
  982. >
  983. >Hi,
  984. >
  985. >I bought your book "Exploring Expect" from O'Reilly.
  986. >I wonder can you put the eamples in your book into an anonymous ftp
  987. >site?
  988.  
  989. All of the substantive examples come with recent versions of Expect.
  990. Just look in the example directory.
  991.  
  992. Don
  993. ----------------------------------------------------------------------
  994. #24 Is the front cover of your book a self portrait (ha ha)?
  995.  
  996. To: pkinz@cougar.tandem.com (kinzelman_paul)
  997. Subject: the cover?
  998. In-Reply-To: <9501101819.AA11103@kinz.cougar.tandem.com>
  999. References: <9501101819.AA11103@kinz.cougar.tandem.com>
  1000. --text follows this line--
  1001. kinzelman paul writes:
  1002. >The book finally came in. I tried to buy 4 copies but they had only 2
  1003. >left and they came in last Saturday. Move over Stephen King! :-)
  1004.  
  1005. 4 copies!?  Wow.  That's more than my mother bought! 
  1006.  
  1007. >I was discussing your book with somebody who stopped in and we began
  1008. >to speculate about the monkey on the cover. I don't suppose it's a
  1009. >self portrait? :-)
  1010.  
  1011. There is some real humor here.  There seems to be considerable debate
  1012. over what the creature is!  The colophon at the end of the book says
  1013. that it is a chimpanzee.  I like that idea much more than a monkey
  1014. which is what it looks like to me.  My wife, who has a degree in
  1015. zoology, explained to me that chimps are actually the smartest of
  1016. primates after man.  Chimps are very intelligent and can do many
  1017. things (but not everything) that humans do.  Perfect for describing
  1018. Expect.  Anyway, she says I should be honored to have it grace the
  1019. cover of the book - even in theory.
  1020.  
  1021. I remarked to Edie (the cover designer at O'Reilly) that even though
  1022. the cover was nice looking, everyone was going to stare at it and say,
  1023. "Gee, but it looks like a monkey."  She replied "The purpose of the
  1024. cover is just to get people to pick the book up. This cover will do
  1025. that. Don't worry. If you get any rude comments from anyone, at least
  1026. you know they are paying attention."
  1027.  
  1028. Don
  1029. --------------------------------------------------------------------------
  1030. #25 Are there any hidden dangers in using Expect?
  1031.  
  1032. From: Charlton Henry Harrison <charlton@cs.utexas.edu>
  1033. To: libes@NIST.GOV
  1034. Date: Fri, 27 Jan 1995 23:30:56 -0600
  1035.  
  1036. >>>Dear Don:
  1037. >>>
  1038. >>>    I've been a fan of expect ever since I first learned of UNIX back
  1039. >>>in late '93. I'm young and don't have my CS degree just yet, but I worked
  1040. >>>a while back at Texas Instruments in their Telecom Customer Support dept.
  1041. >>>I started in late '93 (and hence, that's where I first started exploring
  1042. >>>the UNIX environment) and immediately forsaw the need of automating a lot
  1043. >>>of my redundant and mindless duties, but I didn't know how since we were
  1044. >>>working over a heterogeneous LAN with multiple OSs.
  1045. >>>    Then I found out about expect. I automated everything! My boss didn't
  1046. >>>like hearing that I was working on something else in order to get out of
  1047. >>>work, and I got tired of explaining it to him.
  1048. >>>    Although I accomplished all the aspects of my duties, I was infamous
  1049. >>>for being the laziest person at work, and it showed (I made my job SO easy).
  1050. >>>I got a new boss after a while, and he hated me from the start and fired
  1051. >>>me soon after. Oh well, I guess my mentality didn't click with theirs. 
  1052. >>>    There are a lot of people like that: they believe life is putting
  1053. >>>in a hard day's work to get by. I hate that.
  1054. >>>    So the point is, thank you for the wonderful 'expect'. I bought
  1055. >>>your book and now I have the most recent version of it on my Linux system
  1056. >>>at home. Needless to say I'm looking for another job, though.
  1057. >>>
  1058. >>>                            Charlton
  1059. >>> 
  1060. >> Thanks very much for your nice letter.  Sorry to hear about your
  1061. >> automating yourself out of a job.  Actually, I think most computer
  1062. >> scientists have to face this dilemma.  In some ways, it's a
  1063. >> self-defeating occupation.
  1064. >>
  1065. >> Don
  1066. >
  1067. >Yeah, I'd be interested in hearing if you have a personal philosophy on
  1068. >how to handle this kind of thing. I plan on pursuing a career in Artificial
  1069. >Intelligence for similar reason of making life easier for everyone (me
  1070. >in particular!)  What the future holds in this category is a great
  1071. >mystery.
  1072.  
  1073. I'm glad you asked.  My personal philosophy on this kind of thing is:
  1074. Find someone really rich and marry them.
  1075.  
  1076. Don
  1077. --------------------------------------------------------------------------
  1078. #26
  1079. To: wren@io.nosc.mil
  1080. Subject: Compile fails with: Don't know how to make pty_.c
  1081. --text follows this line--
  1082. You wrote:
  1083.    I'm trying to compile Expect on hpux 9.01, 
  1084.    downloaded from ftp.cme.nist.gov expect.tar
  1085.  
  1086.    after running config
  1087.    the make fails with  "Don't know how to make pty_.c. (compile fails)
  1088.    I see three versions pty_sgttyb.c, pty_termios.c and pty_unicos.c in
  1089.    the load, but the configure picked none of them.
  1090.    I tried forcing to pty_termios.c but that failed with other compile errors.
  1091.  
  1092. I've seen this happen because gcc was partially installed.  configure
  1093. finds the gcc stub and uses gcc for all the tests.  But because the
  1094. compiler doesn't work, every test fails so configure doesn't select
  1095. any of the choices.
  1096.  
  1097. So either finish installing gcc or delete the stub.
  1098.  
  1099. (And if it's not that, then something similar is wrong with whatever
  1100. compiler you've got.  Look closely at the output from configure, it
  1101. will tell you what compiler it is trying to use.)
  1102.  
  1103. By the way, Expect compiles fine on my HP (A.09.05 E 9000/735).
  1104.  
  1105. Don
  1106.